<template>
  <div>
    <dt-modal-info ref="info" title="移除订单明细" :width="800">
      <span class="tips">
        <Icon type="md-alert" class="tips_icon" />
        <span v-if="orderType == '认购'" style="color: #606266">
          以下订单已退订或转签约并从调整单列表中移除，不可再次发起调整
        </span>
        <span v-if="orderType == '签约'" style="color: #606266">
          以下订单已退订并从调整单列表中移除，不可再次发起调整
        </span>
      </span>
      <dt-grid ref="table" page :height="500" :onFetch="onFetch" />
    </dt-modal-info>
  </div>
</template>

<script>
  import detailColumn from '../opt/unsubscribeColumns'
  import adjustMgr from '@/biz/sales/adjustOrder'

  export default {
    data() {
      return {
        list: [],
        orderType: '',
        orderIds: []
      }
    },
    methods: {
      show(data) {
        console.log('auditInfo----', data)
        this.orderType = data.orderType
        this.orderIds = data.orderIds
        this.$refs.info.show()
        this.$refs.table.init(this, new detailColumn(this))
        this.$refs.table.fetch()
      },
      onFetch(data) {
        let params = {
          ...data,
          adjustmentId: this.$route.query.adjustmentId,
          orderIds: this.orderIds,
          jumpType: 2
        }
        this.filterParams = { ...params }
        return adjustMgr.getAdjustOrderList(params).then((res) => {
          return res
        })
      },
      hide() {
        this.$refs.info.hide()
      }
    }
  }
</script>

<style lang="scss" scoped>
  .tips {
    margin-bottom: 15px;
    background-color: rgba(254, 252, 236, 1);
    width: auto;
    line-height: 32px;
    padding: 10px;

    .tips_icon {
      font-size: 20px;
      color: #0f42a7;
    }
  }
</style>
